<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>不动产信息</title>
    <link rel="stylesheet" href="../../js/bower_components/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../js/bower_components/bootstrap-select/dist/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="../../js/bower_components/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css">
    <link rel="stylesheet" href="../../js/bower_components/bootstrap-table/dist/bootstrap-table.min.css">
    <link rel="stylesheet" href="../../js/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.css">

    <script src="../../js/bower_components/jquery/dist/jquery.min.js"></script>
    <script src="../../js/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../../js/bower_components/bootbox.min.js"></script>
    <script src="../../js/bower_components/bootstrap-select/js/bootstrap-select.js"></script>
    <script src="../../js/bower_components/bootstrap-switch/dist/js/bootstrap-switch.min.js"></script>
    <script src="../../js/bower_components/bootstrap-table/dist/bootstrap-table.min.js"></script>
    <script src="../../js/bower_components/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js"></script>
    <script src="../../js/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.js"></script>
    <script src="../../js/bower_components/jquery-form-validator/form-validator/jquery.form-validator.min.js"></script>
    <script src="../../js/bower_components/moment/min/moment-with-locales.min.js"></script>
    <script>
        $(function (){
            initRole();
            inittable();
        })

        function initRole() {
            $("#selCategory1").empty;
            $.ajax({
                type: "post",
                url: "http://121.37.241.58:8883/logic/trans/permanent/history",
                dataType: "json",
                success: function (res) {
                    console.log(res);
                    if(!res.flag){
                        $.each(res,function(i,n){
                            $("#selDept").append("<option value=\""+n.dept+"\">"+n.dept+"</option>")
                        });
                        $("#selDept").append("<option value='全部'>全部</option>");
						$("#selDept").selectpicker('refresh');
                    }
                }
            })
        }

        function inittable(){
            $("#tblResult").bootstrapTable("destroy");
            $("#tblResult").bootstrapTable({
                loadMsg: "正在加载数据....",
                url: "",
                sidePagination: 'client',
                pageSize: "5",
                Pageinatin: true,
                idField: "id",
                columns:[{
                    field: "assetscode",
                    title: "资产编码",
                    halign: 'center'
                },{
                    field: "namecn",
                    title: "资产名称",
                    halign: 'center'
                },{field: "normalbrand",
                    title: "品牌",
                    halign: 'center'
                },{field: "normalmodel",
                    title: "型号",
                    halign: 'center'
                },{field: "supplier",
                    title: "供货商",
                    halign: 'center'
                },{
                    field: "kucun",
                    title: "记录",
                    halign: 'center'
                }]
            })
        }
    </script>
</head>

<body>
    <div class="container-fluid">
     <div class="row">
         <div id="divSearchForm" class="col-md-10">
             <div>
                 <label for="spanCategoryGroup">资产分类：</label>
                 <span id="spanCategoryGroup">
                     <select id="selCategory1">
                         <option value="-1">全部</option>
                     </select>
                     <label for="spanCategoryGroup">地址：</label>
                 <span id="spanCategoryGroup">
                     <select id="selCategory1">
                         <option value="-1">天津津南区</option>
                     </select>
                 </span>
                 <label for="tbxAssetsName">资产名称：</label>
                 <input type="text" id="tbxAssetsName">
                 <label for="tbxAssetsCode">资产编号：</label> 
                 <input type="text" id="tbxAssetsCode" />
             </div>

             <div id="two">
                <label for="tbxAssetsName">备注时间：</label>
                 <input type="text" id="tbxAssetsName">
                 <label for="tbxAssetsName">创建时间：</label>
                 <input type="text" id="tbxAssetsName">
                 <label for="city">时间：</label> 
                     <select id="city">
                         <option value="-1">1：00</option>
                     </select>
             </div>


             <div>
                 <label for="area">面积：</label> 
                     <select id="area">
                         <option value="-1"> 450平米</option>
                     </select>

                     <label for="city">所在城市：</label> 
                     <select id="city">
                         <option value="-1"> 北 京</option>
                     </select>

                     <label for="equitytype">所在权城市：</label> 
                     <select id="equitytype">
                         <option value="-1"> 天 津</option>
                     </select>
                     
                     <label for="scale">出资比例：</label> 
                     <select id="scale">
                         <option value="-1">1 :2</option>
                     </select>

                     <label for="util">所属部门：</label> 
                     <select id="util">
                         <option value="-1"> 全 部</option>
                     </select>

                 
                 <button type="button" id="btnSearch" class="btn-primary"> 
                     <span class="glyphicon glyphicon-search">检索</span>
                 </button>
             </div> 
         </div>
     </div>

     <div class="row"> 
         <div class="col-md-10"> 
             <div id="toolsButtons">
                 <button type="button" id="btnAdd" class="btn-success">
                     <span class="glyphicon glyphicon-plus">新增资产</span>
                 </button>
                 <button type="button" id="btnInstockShow" class="btn-primary"> 
                     <span class="glyphicon glyphicon-download-alt">资产入库</span>
                 </button>
                 <button type="button" id="btnEdit" class="btn-warning"> 
                     <span class="glyphicon glyphicon-edit">编辑资产</span>
                 </button> 
             </div>
         </div>
     </div>


     <div class="row col-md-10">
         <table id="tblResult"></table>
     </div>
 </div>
 </body>
 </html>